Fixed obsolete null-test

The changed line of code was based on the old system with clanlib callbacks which no longer exist. Now as `std::function` is used, the `is_null` method is no longer applicable. I replaced it with the boolean operator of `std::function`.

As I use the event dispatcher in my current project I also could test this and it works.