use one generic method for checking for null instances

rename constants in base servlet

Change-Id: If9d293bbbafe8fe72149a7383ebe7cf248eb919d