adding a node_type property to nodes so that we can do some checks