loadScopes = function (type, value, options, callback) {
        var done = function (err, scope) {
            if (err) { return callback(new Error(LOAD_ERROR_MESSAGE + `${type}\n  ${err.message || err}`)); }

            if (!_.isObject(scope)) {
                return done(new Error(LOAD_ERROR_MESSAGE + type));
            }

            callback(null, new VariableScope(VariableScope.isVariableScope(scope) ? scope.toJSON() : scope));
        };

        if (_.isObject(value)) {
            return done(null, value);
        }

        externalLoader(type, value, options, done);
    }
Helper function that manages the load of environments and globals

@private
@param {String} type - The type of resource to load: collection, environment, etc.
@param {String|Object} value - The value derived from the CLI or run command.
@param {Object} options - The set of wrapped options.
@param {Function} callback - The function invoked when the scope has been loaded.