Fix UiTextTag to work with Messages

When ui:text tag 'from' attribute is used with Messags, ClassCastException happens.