Checking for node type