Add checkInvariants method, can be used to check that tree is still a BST after insert, delete or rotate