Conditionalized invocation of success and error handlers.

Maybe they're null.