When a WordPress post has no title, it is beneficial to provide fallback text that will print to still provide a link to the post.

Place the following code in between the title permalink anchor tags in your loop to generate “Untitled Post” text for any post where the user has not entered a title:

<?php 
	$title = get_the_title();
	if (strlen($title) == 0) echo 'Untitled Post'; 
	else echo $title; 
?>

Edit the snippet appropriately for your needs.