If the callback is optional, we should check for null here before setting up the callback in webworks.