Added base case so it doesn't freak out on empty lists.
Merge pull request #273 from DOAJ/issue269

Added base case so it doesn't freak out on empty lists.