I saw it being checked like that, I think it reads a bit cleaner.
Lookgs good to me, I'll wait for Kai to approve this since he is the maintainer. One thing to consider maybe, did /.flatpak-info always exist or is it something new? I always assumed there is just one flatpak-info file in $XDG_RUNTIME_DIR. Just to be sure it will work for older Flatpak versions.
I think Kai is right, since there is /.flatpak-info (which I didn't know about until now), you don't need to check $XDG_RUNTIME_DIR.