Removing use of String.isEmpty(), which isn't in Java 5.