__getitem__ to check for container-like objects