when is it appropriate to use .isEmpty() vs == null or any other equality checks?