function normalizeUrlOrNull(url, finalDisplayedUrl) {
  try {
    return new URL(url, finalDisplayedUrl).href;
  } catch (_) {
    return null;
  }
}
@param {string} url
@param {string} finalDisplayedUrl
@return {string|null}