Use isEmpty() instead of an empty string comparison.