Adding handler to avoid app crashes when not on MacOS for notifications.