def check_peptide(peptide:str, AAs:set)->bool:
    """
    Check if the peptide contains non-AA letters.
    Args:
        peptide (str): peptide sequence.
        AAs (set): the set of legal amino acids. See alphapept.constants.AAs
    Returns:
        bool: True if all letters in the peptide is the subset of AAs, otherwise False
    """
    if set([_ for _ in peptide if _.isupper()]).issubset(AAs):
        return True
    else:
        return False