added defensive checks to ensure null pointer exceptions do not occur while putting/deleting documents
[2565] NPE in instructorCoursesPage
[2516] NPE from instructorCoursesPage
[2539] Deleting courses causes error
[2546] NPE in InstructorCourseDeleteAction