Correct use of node type predicates