[HAL]Add NULL check before calling g_variant_unref