If you mean the intro image that's used in intro_image layout, use the same check as in the layout:
<?php $images = json_decode($this->item->images); ?>
<?php if (!empty($images->image_intro)) : ?>
<div><?php echo $this->item->introtext; ?></div>
<?php else : ?>
<?php echo $this->item->introtext; ?>
<?php endif; ?>