Tests `is.object(x) && !isS4(x)` and `isS4(x)`, and optionally class.
Tests
is.object(x) && !isS4(x)andisS4(x), and optionally class.