validating if a binary tree is a BST or not