While you’re in The Loop you can check against the WP_Post Object like so:
<?php while( have_posts() ) : the_post(); ?>
<?php if( ! empty( $post->post_title ) ) : ?>
<h1><?php the_title(); ?></h1>
<?php endif; ?>
<?php endwhile; ?>