added test to check if queue and message stats are empty

If there are no queue yet then queue_totals and message_stats arrays are empty so you get a Ruby error.  Added a test to check to see if the array is empty and if it is skip the processing.

Ruby error is: TypeError: no implicit conversion of String into Integer