Hide if none exists

Permalink
I have a page property called "sub_header" that I display if it is set on a page. If it is not set, I use the page description.

How can I suppress the <h2> wrapper code if neither the "sub_header" or description is set?

Here is my code
<h2><?php
         $attr = $c->getAttribute('sub_header');
         if (empty($attr)) {
            echo $c->getCollectionDescription();
         }
         if (isset($attr)) {
           echo "$attr";
         }
         ?></h2>

mattarnzen