Speed up checking for NaN for floats
- [x] closes N/A
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

This isn't giving much speedup because this is simple change, but for some certain inputs like empty datetime fields in csv it gives some speed (because empty fields are parsed as float `NaN`-s).