added type check to look for objects with _getitem_ Fixes #7985

Fixes #7985
``` python
>>> c.doit
<bound method IndexedBase.doit of c>
>>> c.doit()
c
```