from typing import List


def clean_names_list(name_list: List) -> List:
    """Return list with names that wont fail in namex db query."""
    cleaned_list = []
    for name in name_list:
        if "'" in name:
            cleaned_name = name.replace("'", "''")
            cleaned_list.append(cleaned_name)
        else:
            cleaned_list.append(name)
    return cleaned_list