from typing import Union


def index_for_wavelength(wls, w) -> Union[None, int]:
    """Return the index for a particular wavelength or None if not present
    """
    try:
        idx = wls.index(w)
    except ValueError:
        return None
    return idx