def _convert_to_js_string(value):
  """Convert a value to a string, with the JS string values for primitives.

  Args:
    value: The value to stringify.
  Returns:
    A string representation of value. For primitives, ensure that the result
    matches the string value of their JS counterparts.
  """
  if value is None:
    return 'null'
  elif isinstance(value, bool):
    return str(value).lower()
  else:
    return str(value)