is there a way to hide the Upcoming Events widget when

Hi, is there a way to hide the Upcoming Events widget when there are no upcoming events?

Thanks!