Conditional on Header on a View Page? How can I put a condition on the Header in a View to not display the Header if the View has content?

There's an option to display a Header/Footer absent any content, but I'm looking for the opposite effect.
You can user template_preprocess_views_view function to do it

function mymodule_preprocess_views_view(&amp;$variables) {
  if ($variables['view']-&gt;name == 'my_view') {
    if ($variables['view']-&gt;current_display == 'my_display' &amp;&amp; !empty($variables['rows'])) {
      $variables['header'] = '';
      $variables['footer'] = '';
    }
  }
}