I forget now the exact reason this came up. But I do remember there was an instance on our prod where grade['grade'] was undefined, causing this to blow up. The grade_text bits are relatively recent; old versions of this PR didn't have this. Sometime during the lifetime of this PR, something changed somewhere else in platform, and we noticed that we sometimes got undefined and sometimes got HTML in grade['grade']. This, naturally, broke the behavior of our certs branch which uses the grade to look up values to fill in on the cert template. I didn't take time to figure out why the grader's behavior changed, I just decided to normalize by stripping HTML and making undefined equivalent to explicit None.

I think using None to represent undefined is the right thing, because it makes the guard unambiguous below where I can say grade_text is not None.