be smarter about checking if a method is defined directly