With Java6, `String.isEmpty()` has been introduced (and is more efficient than a `String.equals("")`.
`category.getCategoryId().isEmpty()` would be more appropriate. `category.getCategoryId()` can't be `null` obviously, which is fine as it's checked earlier in the stament.