handle nodes that are null