Invoke callbacks only if not nil.