message: Added isBasonOrStringType check utlity.
diff: @@ -7,6 +7,7 @@ import {getDbSpecifcModel} from '../db';
  import {pathRepoMap, getModel, getSchema} from '../../core/dynamic/model-entity';
  import {MetaData} from '../../core/metadata/metadata';
  import {Decorators} from '../../core/constants/decorators';
  +import {Types} from "mongoose";
  export function castToMongooseType(value, schemaType) {
  var newVal;
  @@ -144,3 +145,10 @@ export function getMongoUpdatOperatorForRelation(meta: MetaData) {
  return operator;
  }
  +
  +export function isBasonOrStringType(obj: any) {
  + if (!obj) {
  + return undefined;
  + }
  + return obj instanceof Types.ObjectId || typeof obj === "string";
  +}
  \ No newline at end of file
  