Fix implementation of Measurement::isSameDetectorElement
previously, given two measurements of different 'internal type', calls to isSameDetectorElement
would generate a SEGV due to the unchecked use of getIf
, as in that case, it would return a nullptr
which gets dereferenced.