change empty string check to be backward-compatile with Java 1.5 [0]