Fix NPE in NotificationLogger for real this time

Previous nullcheck just caused another NPE. Actually checking the
null value and adding a test this time.

Bug: 122169343
Test: atest
Change-Id: I4acc055b8d5039ea65fded43526780be883eaf74
2 files changed