Fix a bug when we add a null pointer