read from and write to null pointer