May you please clarify your goal? Are you trying to hide values that come as "NaN" from the Server?
Note that the simplest way to have the value for field i not being shown is to "format" it as an empty string, through setFormattedValue(i, "");