Refactor list method to handle empty contact list