Catch Null pointer Exception