Usually `string.isEmpty()` is preferred to a manual check on the length.