code: function checkType () {
      var i;
      for (i = 0; i < arguments.length; i++) {
        if (!isImageType(arguments[i])) {
          throw {
            name : 'ImageTypeError',
            message : 'Submitted object was not an image.'
          };
        }
      }
    }
docs: Validation