I saw the following piece of code somewhere and wondered if there was any actual benefit of checking isEmpty. There isn't right?
List<Long> someIds = ..
if (someIds != null && !someIds.isEmpty()) {
for (Long someId : someIds) {
// something
}
}