added validation to Task model