check node type