check a binary tree if it is a bst