code: function clearMime(mimeType) {
    if (!mimeType || (String(mimeType) !== mimeType)) { return ''; }
    return mimeType.split(';')[0].trim().toLowerCase();
  }
docs: Remove charset/types/spaces, convenent for external data check " tExt/htMl ; charset=UTF-8 ; type=foo " -> "text/html"