added type check to look for objects with _getitem_ #7985

It's not balanced. Modify it to something similar to the test written just above it.