Added methods to test a node type and to return node values