Use respond_to? instead of method_defined?