Implement a function to check if a binary tree is a binary search tree.
Example 1:
Input:
2
/ \
1 3
Output: true
Example 2:
Input:
5
/ \
1 4
/ \
3 6
Output: false
Explanation: Input: [5,1,4,null,null,3,6].
the value of root node is 5, but its right child has value 4.