Check is_object before passing into get_class - fixes #3