Generally it is better to use TextUtils.isEmpty for these kind of checks.
It takes care of nulls for you (just in case).