import six


def _ListArg(arg):
  """Return a new list from arg.

  Args:
    arg: If a non-string iterable, return a new list with its contents. If
      None, return an empty list.

  Raises:
    TypeError: if arg is a string or non-iterable (except None).
  """
  if isinstance(arg, six.string_types):
    raise TypeError('string not allowed')
  if arg is None:
    return []
  return list(arg)