handle instances where textfield is using NSAttributedString

hey there
added support for instances where the textfield is using NSAttributedString (where .attributedText is the property) instead of just NSString (where .text is the property)