avoiding a possible null pointer