You’re most likely attempting to call a function on a null object. At the point in time where your N key is pressed down, a widget of type UI_Notification has not been created, meaning your UI Notification variable reference was never assigned, giving you a null value.