You can check it with utility method "isEmpty" from TextUtils,
isEmpty(CharSequence str) method check both condition, for null and length.
public static boolean isEmpty(CharSequence str) {
if (str == null || str.length() == 0)
return true;
else
return false;
}