catch potential classcastexception when getText returns SpannableString