code: function checkAllowedTypes(options) {
              if (allowedTypes[options.type] === undefined) {
                  return Promise.reject(new common.errors.BadRequestError({message: common.i18n.t('errors.api.slugs.unknownSlugType', {type: options.type})}));
              }
              return options;
          }
docs: ### Check allowed types
  check if options.type contains an allowed type
  @param {Object} options
  @returns {Object} options