Actually, many sort algorithms don't test for no elements, or only one element, and will fail.
The same holds true for many merge algorithms which don't sequence check the data files being merged. Many of these merge algorithms will also fail if either or both data files are empty.
You always have to check for everything. If it's possible, it will happen sometime. I used to be criticised for sequence checking a file that just came out of a sort utility. Well, one day the sort failed without my knowledge, and the resultant unsorted file screwed up my whole process. Never again, detect it and abort.