TypeError fix

klass(obj).instance_methods can launch a TypeError Exception