Add method handling for NaN