Using the NaN check in multiple places
Dealing with 'nan' string