BUG fix for datetime null (closes #56853)
Closes #56853

This is my first time contributing to this repo and I'm not super experienced with open source, sorry if the style isn't right or if there's some better way of doing it.

From what I can tell, the issue was caused by recurring calls to `get_loc` functions caused by the fact that when you pass in a datetime, it automatically converts subsequent insertions in the same level to datetime. If you don't supply one, it converts it to `NaT`, which causes an indexing error due to having a null value as an index, which gets you caught in endless recursion from `try`/`except` blocks. If you switch the datetime out for a float (or any other common type), the problem is avoided because the unfilled indexes are filled in will empty strings rather that null values. As far as I can tell, this problem only exists with datetime types.

It's kind of a hacky fix, but I figured it would just be easiest to check for null values in the indexes at the end of an insertion and replace them with empty strings. I tried fiddling around with the datetime stuff itself, but it just ended up messing other things up. Let me know if there's some other solution. I also added this as a test case, just to see whether it breaks.

- [x] xref #56853
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions (no new arguments/methods/functions).
- [x] Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
pre-commit.ci autofix pre-commit.ci autofix Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.