Added validations for task.