PHP if have image display image, if else text

I posted this question on stackoverflow, and got this answer from @cmorrissey. Credit goes to him for this code.

    <?php if($novus_logo_upload = get_option('novus_logo_upload')){ ?>
      <!-- Logo Image -->
        <a href="https://wordpress.stackexchange.com/questions/149443/<?php bloginfo("url'); ?>/home" title="<? echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
        <? echo '<img class=\"logo"\ src="'.$novus_logo_upload.'" width=\"100%"\ />'; ?>
        </a>
      <?php } else if($novus_logo_text = get_option('novus_logo_text')){ ?>
        <!-- Logo Text -->
        <h1><a href="https://wordpress.stackexchange.com/questions/149443/<?php bloginfo("url'); ?>/home" title="<? echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
        <? echo $novus_logo_text; ?>
        </a></h1>
      <?php } else { ?>
        <!-- Default -->
        <h1><a href="https://wordpress.stackexchange.com/questions/149443/<?php bloginfo("url'); ?>/home" title="<? echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> My Site </a></h1>
      <?php } ?>