Skip instances of BasicObject

The other checks assume that the object under consideration descends from Object and can fail if the object descends from BasicObject instead.