Fix null pointer exception when no code parameter is given in CourseServlet