TODO performance optimization in isElement() and isString