def add_dflt(func, dflt_if_none):
    @wraps(func)
    def wrapped_func(*args, **kwargs):
        result = func(*args, **kwargs)
        if result is not None:
            return result
        else:
            if callable(dflt_if_none):
                return dflt_if_none()
            else:
                return dflt_if_none

    return wrapped_func