input: Write a python function to check if a binary tree is balanced.
  assert is_balanced(Node(1))==True
  assert is_balanced(None)==True
  assert is_balanced(Node(1, Node(2), Node(3)))==True
  assert is_balanced(Node(1, Node(2, Node(4)), Node(3)))==False
output: class Node:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  def is_balanced(root):
      def check_height(node):
          if not node:
              return 0, True
          
          left_height, left_balanced = check_height(node.left)
          right_height, right_balanced = check_height(node.right)
          
          current_height = max(left_height, right_height) + 1
          if abs(left_height - right_height) > 1 or not left_balanced or not right_balanced:
              return current_height, False
          
          return current_height, True
      
      _, balanced = check_height(root)
      return balanced