Makes the tree class a little safer from null pointers