Is ValueError still raised by get_course? It just returns None if it can't find the course.