Fix for NMS-5852 - Uncaught exception in HostResourceSwRunMonitor when handling empty strings

I've added some explicit checks, and a customer has validated that the
problem has been resolved.