NPE Fix Feature Branch

NPE fixes from rSmart/issues#243
I thought we were going to handle a null session?