due to some reasons I started to meet NPE because of servletContext, so,
I've added checking for it
Merge pull request #3 from akakunin/master

Fix for possible NPE on ServletContext