getNodeType function

Determine the node type and return as a string