Allow applications using KActivities to not crash even if no dbus server is around.
e.g. Kate on macOS does immediately crash on opening any file ATM, as the calls have no checks if dbus is alive at all.
With these checks, all is fine, thought no activities handling occurs, naturally.
An other solution would be to just skip compiling kactivies on macOS, but on the other side I think guarding against the case of no dbus connection is around doesn't hurt.