Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
Why is this being skipped in Studio? Both lms and studio use edxmako.