Check if tree is balanced or not.