def sort_list(doc_name: str, *vart):
    """Checks if a string contains the identifiers in vart. If it does return the initial string, if not return None."""
    for var in vart:
        if var.lower() in doc_name.lower() and "(old" not in doc_name and "~" not in doc_name:
            return doc_name