def check_chk(chk, name, requires_chk):
    """Check that chk is provided when required

    Parameters
    ----------
    chk : int
    name : str
    requires_chk : [str]
    """
    if chk is None:
        if name in requires_chk:
            raise ValueError(f"must provide chk for '{name}'")
        else:
            chk = -1  # dummy value required for string substitution

    return chk