use inorder traversal to check whether the tree is valild BST