Don't crash if obj is not a JSObject.