code: function checkArgumentType(argument, position, type) {
      let wrongTypeOf = typeof argument !== type;
      let isCheckObject = type === 'object';
      let n = isCheckObject ? 'n' : '';
      if (isCheckObject && (wrongTypeOf || argument.constructor !== Object) || wrongTypeOf) {
          throw new TypeError('A ' + position + ' argument must be a' + n + ' ' + type + '.');
      }
  }
docs: Check type of argument
  @function checkArgumentType
  @param {*} argument
  @param {String} position - first, second, ...
  @param {String} type - string, function, ...
  @throws {TypeError}
  @private