BUG: Fix nested_to_record with None values in nested levels
- [ ] closes #21158
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Continue after pop so you dont pop with the same key twice in a row

