def check(name):
    """
    Checks a string whether is needs to be sanitized.

    :param name: The name.

    :returns: True if the name is valid, false otherwise.
    :rtype: bool
    """
    if isinstance(name, bytes):
        name = name.decode()
    return "/" not in name