check if obj is an object