magento2 – By block, get a custom type image or display the default values

I want to display my new type of product image in my phtml.

I use:

echo $ block-> getImage ($ product, "custom_type_image") -> toHtml ()

It works, but all my products do not have an image of this type. So, if no image was found, I would like to display the default images such as:

echo $ block-> getImage ($ product, "product_base_image") -> toHtml ()

How to check?
I can not check if $ block-> getImage ($ product, "custom_type_image") -> toHtml () is null because, if he can not find my photo, he creates one like custom_type_image.jpg ( that does not exist, so the photo is brocken)