Removed superfluous NaN check