Using a Map with NaN instead of a pair