Ah, I missed that.
Some people really love smuggling state around in function parameters for recursion, but I don’t care for it. You already have a return value - just use it. Using the return value will simplify your code
This is still wrong. An empty tree is a valid binary search tree.
And there is no reason to forbid additional properties on a node