check double is nan or not