optimized web.isObject and web.isType