Possible null pointer fixes