compare node type