input: Write a function to convert an HTML string to plain text without using any external libraries. If the input HTML string is empty or None, return an empty string.
  def html_to_text(html_string):
      if not html_string:
          return ''
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif not in_tag:
              output += char
      return output
  
  assert html_to_text("<p>Hello, <b>world</b>!</p>")=="Hello, world!"
  assert html_to_text("<a href='example.com'>Link</a>")=="Link"
  assert html_to_text("""<html><head><title>Title</title></head><body><h1>Heading</h1><p>Paragraph</p></body></html>""")=="TitleHeadingParagraph"
  assert html_to_text("")==""
  assert html_to_text(None)==""
output: def html_to_text(html_string):
      if not html_string:
          return ''
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif not in_tag:
              output += char
      return output