if (studentTestQuestion.getTestQuestionOrder().equals(order) && studentTestQuestion.getResponse().equals(response)) {
if (studentTestQuestion.getResponse() != null && studentTestQuestion.getTestQuestionOrder().equals(order) && studentTestQuestion.getResponse().hasResponse(response)) {
    public int countResponses(final Integer order, final String response) {        int count = 0;        for (final StudentTestQuestion studentTestQuestion : getDistributedTestQuestionsSet()) {            if (studentTestQuestion.getTestQuestionOrder().equals(order) && studentTestQuestion.getResponse().equals(response)) {                count++;            }        }        return count;    }