Detect when server responds with an error
Check for nil values

If you have an empty queue, most of these values will not be present
in the `queue`. Check to see if there is a proper value and otherwise
return a 0 (vs blowing up or nil)