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)
Nit:
If(not equal to NaN) {
DllEnforce
} 
Result.doStuff

Prefer flat code style