[notes] prevent null pointer dereference