Make nan values detection case insensitive