use isEmpty instead of chaining 20 functions

I just discovered TextUtils, thanks StackOverflow!