code: func (ms *modelSpec) checkModelsType(models interface{}) error {
  	if reflect.TypeOf(models).Kind() != reflect.Ptr {
  		return fmt.Errorf("models should be a pointer to a slice or array of models")
  	}
  	modelsVal := reflect.ValueOf(models).Elem()
  	elemType := modelsVal.Type().Elem()
  	switch {
  	case !typeIsSliceOrArray(modelsVal.Type()):
  		return fmt.Errorf("models should be a pointer to a slice or array of models")
  	case !typeIsPointerToStruct(elemType):
  		return fmt.Errorf("the elements in models should be pointers to structs")
  	case elemType != ms.typ:
  		return fmt.Errorf("models were the wrong type. Expected slice or array of %s but got %T", ms.typ.String(), models)
  	}
  	return nil
  }
docs: // checkModelsType returns an error iff models is not a pointer to a slice of models of the
  // registered type that corresponds to modelSpec.