getNodeHeight(node) {
    let height = 1;
    if (node.left !== null && node.right !== null) {
      height = Math.max(node.left.height, node.right.height) + 1;
    } else if (node.left !== null) {
      height = node.left.height + 1;
    } else if (node.right !== null) {
      height = node.right.height + 1;
    }
    return height;
  }
Calculates the height of a node based on height
property of all his children.