Refactoring Pry::Method.instance_of_basicobject?