code: def text_to_bool(value: str) -> bool:
      
      try:
          return bool(strtobool(value))
      except (ValueError, AttributeError):
          return value is not None
docs: Tries to convert a text value to a bool. If unsuccessful returns if value is None or not
  
      :param value: Value to check