Added a weak check for the callback parameter.