utils: Fix potential NULL pointer use

Check if g_dbus_proxy_new_sync() returned NULL before using the value. I
don't know if this happens in practice.
1 job for check-dbus-proxy-error in 4 minutes and 52 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #595027
build-fedora

00:04:52