use method_defined?