BUG: avoid triggering numpy deprecation warning in assert functions for nested array with empty array/list
I haven't added a whatsnew note, because it shouldn't change behaviour but just avoids a warning being triggered (so thought that to not warrant a mention in the release notes)


- [x] closes #59776
- [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
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Does this need a backport? No, it's just for silencing a warning in a corner case, not worth of backporting