[javascript] How to turn NaN from parseInt into 0 for an empty string?