added if not for empty task list
Merge pull request #1 from caileyfitz/master

Fixes error for empty tasklist