Cast NaN and Infinity to zero