getNodeAtTreePath should handle undefined treePath and return nothing.