More strict checking for error conditions in callbacks.