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

Does doit work on this?