Better .type()

Uses `class2Type()` to retrieve type. `class2Type()` is built on first usage and then returns the cache.