This is a little confusing, you say that you replace NULL with NaN, but in the screenshot you have non-NULL values?
In any case, we don't see the code where you put in the NaN. So this is all a bit of a guessing game. But add datalength(Fax) and datalength(SupplierLevel) to your debug output. datalength returns the number of bytes in the value. len, on the other hand, returns the number of characters, excluding trailing spaces, which can trip you.