Consider using commons-lang's StringUtils.isBlank(str) for those checks.  It checks for null and empty strings.