Zend certified PHP/Magento developer

get Image thumbnail magento 2

I am getting my images in the array.

I need to check the if image in the array is empty then it should be replaced with the thumbnail image.

Here is my code :

if (is_null($imageData->getData('demo_promo')) 

Please help me to replace the thumbnail image instead of the empty demo_promo in the array above.
I tried many things but it doesn’t work.