boolean (@Nullable String s1, @Nullable String s2) { //noinspection StringEquality if (s1 == s2) return true; if (s1 == null || s2 == null) return false; if (s1.length() != s2.length()) return false; return s1.equals(s2); }