If it only breaks when the excerpt is empty, then I would check for the excerpt before outputting it.
<?php if ( ! empty( get_the_excerpt() ) : ?> // test for the excerpt
<?php echo esc_html( get_the_excerpt() ); ?> // escape the excerpt in case there is html added
<?php endif; ?>