Check object is being passed to get_class