Fix .equals() comparison with empty string

It is normally more performant to test a String for emptiness by
comparing its .length() to zero instead.
Powered by InspectionGadgets
Merge pull request #39 from naoliv/pull7

Fix .equals() comparison with empty string