TRQ-1636. Add some defensive programming to mom_get_sample() and the routines around getting the snapshot of the system state. Previously failures here just would cause us to crash.