Added validation to 0 tasks in JobController