java check a list is null or empty in guava code example Example: how to check if a list is empty java if (list != null && !list.isEmpty()) { do something }