Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
Merge pull request #4833 from edx/waheed/hotfix/2014-08-12

Check REQUEST_CONTEXT.context exists before accessing it.