def validateWavelengths(wavelengths: list, bbl: list):
    """
    Validate wavelengths and bbl.

    Parameters
    ----------
    wavelengths : list of int
        List of measured wavelength bands
    bbl : list of str/int/bool
        List of bbl values that say which wavelengths are measured in
        good quality (1) and which are not (0)

    Returns
    -------
    list of int
        Validated `wavelengths` list
    list of int
        Validated `bbl` list

    Raises
    ------
    ValueError:
        Raised if `wavelengths` and `bbl` are of a different length.

    """
    # check for inconsistencies
    if len(wavelengths) != len(bbl):
        raise ValueError(
            "Length of wavelengths ({0}) and bbl ({1}) is not equal.".format(
                len(wavelengths), len(bbl)))

    # remove zero-wavelength at the beginning
    if len(wavelengths) == 139:
        return wavelengths[1:], bbl[1:]

    return wavelengths, bbl