Add check in Listener.notify for valid function callback

- more defensive if something happens to function reference elsewhere