def valid_gameweek(gameweek):
    """Returns True if the gameweek is valid."""
    if not isinstance(gameweek, int) and (gameweek < 1 or gameweek > 38):
        raise 'Gameweek must be a number between 1 and 38.'
    return True
