Checks if the nepali date is in valid range for conversion

def check_valid_bs_range(date):
    """
    Checks if the nepali date is in valid range for conversion
    """
    ERR_MSG = "%s out of range" % str(date)

    if date.year < values.START_NP_YEAR or date.year > values.END_NP_YEAR:
        raise ValueError(ERR_MSG)
    if date.month < 1 or date.month > 12:
        raise ValueError(ERR_MSG)
    if date.day < 1 or date.day > values.NEPALI_MONTH_DAY_DATA[date.year][date.month - 1]:
        raise ValueError(ERR_MSG)
    return True