def year_type(s):
    """Validate the type of year argument.

    Args:
        s (str): The parsed argument.

    Returns:
        int: Year if valid.

    Raises:
        ValueError: If `s` is not a valid year.

    """
    y = int(s)
    if y < 1950:
        raise ValueError('Year should be provided in four-digit format and greater than 1950.')
    return y