cleanup is_nan