changed type-checking in __getitem__