code: function convertNullToNotFoundError (toModelName, ctx, cb) {
    if (ctx.result !== null) return cb()
  
    var fk = ctx.getArgByName('fk')
    var msg = 'Unknown "' + toModelName + '" id "' + fk + '".'
    var error = new Error(msg)
    error.statusCode = error.status = statusCodes.NOT_FOUND
    error.code = 'MODEL_NOT_FOUND'
    cb(error)
  }
docs: Copied in its entirity from loopbacks Model class.
  it was necessary to do so as this function is used
  in the other code below