Add some extra checks to the picking method
It is possible for the XrView to exist before the internal viewport,
usually the case for visionOS, and in that case we can cause the picking
functions use a null pointer. This can be observed on the visionPro, but
it's a bit unclear why closestPointPick() function is called before
anything is visible on the screen with the xr_touch example.
Pick-to: 6.11
Change-Id: I7586f5817c7d03a7877114726a7763536c80a054
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>