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
if (str == null || str.trim().length() == 0) { // str is empty }