Google script parseInt and NaN - how it really works?
<p>I'm going to check if certain variable is a string or number.
I use <code>parseInt()</code> function which returns <code>NaN</code> (Not a Number) if value is a string.
But, when I try to check it in if statement it looks like <code>"NaN"</code> output can't be treated as a valid condition to check. Any guess why?</p>

<pre><code>function tsCalculate() {
  var string = "Monday";
  var number = 1;
  Logger.log(string);
  Logger.log(number);
  Logger.log("String after parseInt: " + parseInt(string, 10));
  Logger.log("Number after parseInt: " + parseInt(number, 10));
  if ("NaN" == parseInt(string, 10))
  {
    Logger.log("doesn't work");
  }
}
</code></pre>