def ask(value, func, *args, **kwargs):
    """
    Execute function with the given arguments if value is None and return.
    Otherwise, return value.
    """
    if value is None:
        return func(*args, **kwargs)
    else:
        return value
