def valid_gameweek(gameweek):
    """Returns True if the gameweek is valid.

    :param gameweek: The gameweek.
    :type gameweek: int or string
    :raises ValueError: if gameweek is not a number between 1 and 38
    """
    gameweek = int(gameweek)
    if gameweek < 1 or gameweek > 38:
        raise ValueError('Gameweek must be a number between 1 and 38.')
    return True
