Catalina MacMini shut down on sleep ... panic

I recently upgraded my Mac Mini (late 2014) to Catalina - version 10.15.4
It turns off often when it sleeps. Not every time. Usually at night when I’ve left it for a while but not every night.
“Panic” is mentioned in the fault report.
Any ideas how I might solve this?

Here is an article at MacPaw about kernel panics.

Do you have a Hub connected to the Mac Mini???

If you mean a USB hub yes

I’ve removed the USB hub as the MacPaw article also mentions that as a possible problem. I’ll try that for a few days and see if it does the job. But then does that mean I chuck away the hub? Puts me off upgrading the OS as I can’t see much benefit to me and a lot of hassle!