Bug fix: Closes #416
- it is possible that some courses don't have a context for the specific
period and degree, preventing null pointer and returning appropriate
exception