def parse_value(s):
  """Parse a given string to a boolean, integer or float."""
  if s.lower() == 'true':
    return True
  elif s.lower() == 'false':
    return False
  elif s.lower() == 'none':
    return None

  try:
    return int(s)
  except:  # pylint: disable=bare-except
    pass

  try:
    return float(s)
  except:  # pylint: disable=bare-except
    return s