i am sure this must have been asked before in different ways - as isEmptyOrNull is so common yet people implement it differently. but i have below curious query in terms of
Just to show java 8's stance to remove null values.
String s = Optional.ofNullable(myString).orElse(""); if (s.trim().isEmpty()) { ... }
Makes sense if you can use Optional<String>.
Optional<String>