Validate students answers before storing them in the mongodb

If an answer is not an instance of the proper type then return a
bad request error