how to display just text if link has no url acf
<li>
<?php
$text = get_sub_field('list_item');
$url = get_subfield('item_url');
if ($url) {
$text = '<a href="'.$url.'" target="_blank">'.$text.'</a>';
}
echo $text;
?>
</li>