Added the case of an empty list.