def METHOD_NAME(zip: str):
    list_of_dicts_of_alabama_zips = zipcodes.filter_by(state="AL")
    list_of_alabama_zips = [d["zip_code"] for d in list_of_dicts_of_alabama_zips]
    if len(zip) > 10:
        return False
    elif type(zip) != str:  # noqa: E721
        return False
    elif zip in list_of_alabama_zips:
        return True
    else:
        return False