def _default_to(check, default, comparator=None):
    """ If check is None, apply default; else, return check.
    """
    if comparator is None:
        if check is None:
            return default
        else:
            return check
    elif check == comparator:
        return default
    else:
        return check
