Display custom post type title as text if post thumbnail is not available

Try to replace the block in the middle of the query with this code:

<?php if ( has_post_thumbnail()) {
   the_post_thumbnail();
} else {  
   the_title( '<h4>', '</h4>');
} ?>