TST: Apply method broken for empty integer series with datetime index
I added a unit test for an edge case that was failing. Using the apply method on an empty integer series with a datetime index would throw an error.

- [x] closes #21245
- [x] 1 test added
- [x] passes pandas and flake8
