Fix crash when closing GNOME Boxes
There are few corner cases where is_running_in_flatpak ()
doesn't
get called, and hence is_flatpak
is not initialized, causing a crash
when closing GNOME Boxes. So, we directly use is_running_in_flatpak ()
which should take care of 'null' checks.