isResponseContentTypeSupported = (response, contentTypes) => {
  if (!Array.isArray(contentTypes)) return true;

  return !!contentTypes.find(ct => String(response.headers.get('Content-Type')).includes(ct));
}
Tests whether the response content type is supported by the `contentTypes` whitelist
@param {Response} response
@param {string[]|undefined} contentTypes
@returns {boolean} `true` if the contentTypes property is not an array, or if the value of the Content-Type header is in the array