Handle NaN results from Presto server

with comments addressed (throw an exception when we see a non-NaN double in the result while we were expecting a string)