Fix for literal nodes in getNodeType()

Handling all JSON types instead of just strings.