Gio MIME sniffing: fix NULL pointer access and Win32

Check a function call result for being NULL and add check for
unknown content type. This helps Win32.
1 job for akruis_fix_gio_mime_sniffing in 4 minutes and 48 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Build
passed #47310
meson-fedora-x86_64

00:04:48