Add has_object method