@function getModelView

if modelViewName passed return model view by name. otherwise return object
with all global model views indexed by name. if name is passed and model
view is not defined error will be thrown.

@param {string|undefined} modelViewName

@returns {ImmutableCoreModelView|object}
function getModelView (modelViewName) {
    // if name is not passed then return all
    if (!modelViewName) {
        return immutableCoreModelView.modelViews
    }
    // if model view is passed then model view must be defined
    assert.ok(immutableCoreModelView.modelViews[modelViewName], 'model view '+modelViewName+' not found')
    // return model view
    return immutableCoreModelView.modelViews[modelViewName]
}