Evaluating the if statement in entryType
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 %}