Add message string for failure status when a user adds a task.
Add 'if' condition to defend code from invalid input.