def ensure_replicates_kwarg_validity(replicate_kwarg):
    """
    Ensures `replicate_kwarg` is either 'bootstrap' or 'jackknife'. Raises a
    helpful ValueError otherwise.
    """
    if replicate_kwarg not in ['bootstrap', 'jackknife']:
        msg = "`replicates` MUST be either 'bootstrap' or 'jackknife'."
        raise ValueError(msg)
    return None
