generally prefer collection.isEmpty() instead of checking with size()