Hi @vinuu123 ,
I think you might be talking about page property Thumbnail? Assuming that you have to check the custom implemented code where fetching the thumbnail and have added if else condition - should be in HTL. If thumbnail image has been configured render it, otherwise your required expectation implementation goes there. If it's not the page property even in that case above code approach should work.
Hope that helps!
Regards,
Santosh