Added Collection::isEmpty for checking whether the collection is empty.