handle case of null root for BST