Introduce node type predicate methods
Refactor with node type predicate methods