Only listing objects which respond to `class` when indexing