Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
Why not just check if it's truthy?
```python
if getattr(edxmako.middleware.REQUEST_CONTEXT, "context", None):
    # do stuff
```
It's shorter, easier to read, and accomplishes the same thing.