fix crash when tap on an empty UITextView

Well, in this case, I think we should have to check UITextView is not empty at first.
Otherwise, this will causes an exception:
`'NSRangeException', reason: 'NSRLEArray objectAtIndex:effectiveRange:: Out of bounds'`