avoid possible null pointer exception