Code inside conditional is_tax() only working when term has posts

Possibly not the most elegant. This is my new code snippet based on the Genesis archive.php

add_action( 'genesis_before_content_sidebar_wrap', 'custom_do_archive_headings_headline', 12, 3 );

function custom_do_archive_headings_headline( $heading = '', $intro_text="", $context="" ) {
if (is_tax()) {
$archive_title = single_term_title( '', false );
printf( '<div class="title-banner"><div class="inner-wrap"><h1 class="entry-title">%s</h1></div></div>', strip_tags( $archive_title ) );
    }
}

Thanks @filipecsweb @Milo