product types with and without variants
The problem is that item.defaultVariant will always be true even for products without visible variants (see docs on that), so you can't test for it.

You don't really need to test for it though - just look first for images held against the product, and fallback to images held against the default variant like this:

{% for item in craft.products.all() %}
    {% set imageThumb = item.variantThumb|length ? item.variantThumb.one() :
        item.defaultVariant.variantThumb|length ? item.defaultVariant.variantThumb.one() 
    %}
    &lt;img src="{{ imageThumb.url }}"&gt;
{% endfor %}