added type check to look for objects with _getitem_ #7985