added template method isNodeType<T>()