Checking if callbacks are set before calling them