due to some reasons I started to meet NPE because of servletContext, so,
I've added checking for it