function isNullOrNaN(value) {
  if (value === null) return true;
  return isNaN(value);
}
@typedef {object} DocumentMetadata
@property {string} id - eg; "123e4567-e89b-12d3-a456-426614174000"
@property {string} url - eg; "file://example.com/index.html"
@property {string} title - eg; "example.com/index.html"
@property {string} docAuthor - eg; "no author found"
@property {string} description - eg; "No description found."
@property {string} docSource - eg; "URL link uploaded by the user."
@property {string} chunkSource - eg; link://https://example.com
@property {string} published - ISO 8601 date string
@property {number} wordCount - Number of words in the document
@property {string} pageContent - The raw text content of the document
@property {number} token_count_estimate - Number of tokens in the document