optimized .classOf()