title: Obtaining a null pointer exception on hashmap.get() method
body: <p>I seem to be recieving a nullpointer exception when i place a property inside the .get() method when i call the entiire collection it prints what i want here is the code. if anybody can help it would be much appreciated im new to stack overflow. </p>
  
  <pre><code>        session.setAttribute("AvailableLessons",availableLessons.getLessons()); will print out contents of the hashmaps. 
  
          session.setAttribute("AvailableLessons",availableLessons.getLessons(Lesson.description)); will return null pointer expcetion and the property is a db column name and when i step through it, will have a value in the property. 
  </code></pre>
  
  <p>here is the rest of the code:</p>
  
  <pre><code>        private LessonTimetable availableLessons =  new LessonTimeTable();
          HttpSession session = request.getSession();
          session.setAttribute("Username", username);
          response.sendRedirect("/coursework/LessonTimetableView.jspx");
          String printOut = ((String) session.getAttribute("Username"));
          out.print("You are logged in as " + printOut);
          session.setAttribute("AvailableLessons",availableLessons.getDescription());
  </code></pre>
  
  <p>here is the stack trace: </p>
  
  <pre><code>java.lang.NullPointerException
  controller.Controller.processRequest(Controller.java:79)
  controller.Controller.doPost(Controller.java:88)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
  </code></pre>