introduced str2num which converts "" to NaN