I am calling a template part if a term is not null, if it is, it does not call the template part. It does function for everything after the loop, but the <h3>Shows up no matter if the term is null or not. How could I do this without including the <h3> in the loop.

The Call for template
PHP Code:
$term term_exists('the cat''category');
        if (
$term !== null) {
        
get_template_part('/_/inc/template'); 
The Template

Code:
<h3>Head Line</h3>
    <ul id="clearfix">
        <?php
        $theloops = new WP_Query(array(
        'category__in' => array(1),
		'showposts' => '12',
		'post_type' => array(
		'post',
		'custom1',
		'custom2',
		'custom2'
		)
		));
        ?>
        <?php while ($theloops->have_posts()) : $theloops->the_post(); ?>
        <li>
           <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo get_the_post_thumbnail($id, 'thumbnail'); ?></a>
        </li>
        <?php endwhile; wp_reset_postdata(); ?>
    </ul>