code: function isValidType(value, authorizedTypes) {
    var valueToString = Object.prototype.toString.call(value);
  
    for (var i = 0; i < authorizedTypes.length; i++)
      if (valueToString === '[object ' + authorizedTypes[i] + ']') return true;
  
    return false;
  }
docs: Validates the type of a value.
  
  @method isValidType
  @private
  @param {String} value The value to test
  @param {Array} The list of authorized types as strings
  @return {Boolean} true if valid, false otherwise