Handle case where node is nil

i.e. when the node has an empty string