Can you hide a widget based on its content?

Can you hide a widget based on its content?