code: function (data, expectedType, errorMessage) {
              if (!this.novalidate) {
                  if (data == null || ((expectedType === 'array') ? !Array.isArray(data) : typeof data !== expectedType)) {
                      throw new Error(this.transport.TAG + errorMessage);
                  }
              }
          }
docs: Validates data types before being sent to dashboard. Disabled with this.novalidate=true (for tests).
  
  @param {*} data - The value to be validated.
  @param {string} expectedType - Valid output from typeof, or 'array'.
  @param {string} errorMessage