function evaluate(val, context) {
        if ($.isFunction(val)) {
            var args = Array.prototype.slice.call(arguments, 2);
            return val.apply(context, args);
        }
        return val;
    }
Returns a given value
If given a function, returns its output

@param val string|function
@param context value of "this" to be passed to function
@returns {*}