Added input validation for submitAnswers API