Null pointer checked for Bug fixing