Minor fix: checking for callback to be not NULL before calling