def is_allowed_to_retire(deck_id: Optional[int], discord_id: Optional[int]) -> bool:
    if not deck_id:
        return False
    if not discord_id:
        return True
    person = maybe_load_person_by_discord_id(discord_id)
    if person is None:
        return True
    return any(int(deck_id) == deck.id for deck in person.decks)