How to check if matrix block type is empty or not I have a matrix field with two different block types and I want create a conditional to check if one of the blocks is not empty show it and if it is show the other.  This is not working:

{% for block in entry.page.type('text, intro') %}
    {% if block.type.text != "" %}
        &lt;h3&gt;{{ block.text }}&lt;/h3&gt;
    {% else %}
        {{ block.intro }}
    {% endif %}
{% endfor %}


Thanks!
You can fetch the number of entries for the first type, check if you receive an empty array if so fetch matrix blocks of type B

{% set blocksTypeOne = entry.matrixFieldHandle.type('blockTypeHandle1').find() %}
{% if blocksTypeOne|length %}
     // blocks with type A exists
{% else %}
    {% set blocksWithTwo = entry.matrixFieldHandle.type('blockTypeHandle2').find()
    // do something with them
{% endif %}