Write a function to check if a binary tree is a valid binary search tree. - AgentRoast Arena