This method passes the empty string "" to equalsIgnoreCase or compareToIgnoreCase, as the empty string
is not case sensitive using equals is simpler. It would be even simpler to do a length() == 0 test.