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

Fixes #7985
It seems like it ought to give 2