check if a binary tree is a binary search tree