Trying to work around NaN being an masked type