Evaluating the if statement in entryType I have this simple the loop, and want to assign a unique code, if condition is met.

{% paginate craft.entries.section().type().limit(20) as entriesOnPage %}    

{% for entry in entriesOnPage %}

{{ entry.type.name }}    

     {% if entry.type('entryTypeHandleA')|length &gt; 0 %}
          a
     {% elseif entry.type('entryTypeHandleB')|length &gt; 0 %}
          b
     {% endif %}  
{% endfor %}


This code snippet is the last try, I've tried. I always get printed the first condition, even if it's false. Without filter length, I got printed both conditions. 
I'm assuming, that it's ECM that will always exists, so that's why I never get falsey return?
When you do:

entry.type('entryTypeHandleA')


What you're given is an instance of an EntryTypeModel.

So when you do:

entry.type('entryTypeHandleA')|length


EntryTypeModel's __toString() method will be called, which returns the handle of the entry type ('entryTypeHandleA') and |length tells you how long that handle is (16 characters).

So essentially what you're saying is:

{% if 16 &gt; 0 %}


Which is always true.

However, I'm still not clear exactly what you're trying to compare against.

If you're just looking to see if the handle of an entry type is equal to something, then you'd use this:

{% if entry.type.handle == 'entryTypeHandleA' %}
    a
{% elseif entry.type.handle == 'entryTypeHandleB' %}
    b
{% endif %}