text: explain this code:
  function checkMediaProperty(req, mediaPropertyObject){
    const opinError = utils.builtError()
    if ( !utils.isEmpty(mediaPropertyObject) ){
      req.mediaProperty = mediaPropertyObject
      return utils.Promise.resolve()
    }
      opinError.add("media_property", coreapp.translate("genericErrors.invalid"))
      opinError.setType(422)
      throw opinError
  }