validateAsyncAPIDocument(asyncapiDocument) {
    const isAlreadyParsedDocument = isAsyncAPIDocument(asyncapiDocument);
    const isParsableCompatible = asyncapiDocument && typeof asyncapiDocument === 'string';

    if (!isAlreadyParsedDocument && !isParsableCompatible) {
      throw new Error('Parameter "asyncapiDocument" must be a non-empty string or an already parsed AsyncAPI document.');
    }

    this.asyncapi = this.originalAsyncAPI = asyncapiDocument;
  }
Validates the provided AsyncAPI document.

@param {*} asyncapiDocument - The AsyncAPI document to be validated.
@throws {Error} Throws an error if the document is not valid.
@since 10/9/2023 - 4:26:33 PM