better getitem guard for restricted python
wrap document dicts with DotDict in indexer functions