Fix exceptions if keys pressed while no task is selected

Null pointer exceptions were thrown if X, D, U or P were pressed while
no task was selected in the list box. For instance this happens when
the todo list is empty. Guard clauses have been added to prevent the
commands to execute when no task is selected.
Only add new task if it contains text

When Enter is pressed in the description field, but no text is entered,
then this change prevents an empty task being created.
Merge pull request #178 from kvakulo/fix-empty-task

Only add new task if it contains text
Merge pull request #177 from kvakulo/fix-no-task-selected

Fix exceptions if keys pressed while no task is selected