from typing import Optional


def Str2Bool(value: str) -> Optional[bool]:
  """Convert a string to its boolean representation.

  Args:
    value (str): The value to convert to a boolean.

  Returns:
    Optional[bool]: True/False if the string can be associated to a boolean,
        None otherwise.
  """
  if not isinstance(value, str):
    return None
  true_set = {'yes', 'true', 't', 'y'}
  false_set = {'no', 'false', 'f', 'n'}
  if value.lower() in true_set:
    return True
  if value.lower() in false_set:
    return False
  return None