[mlpl][Reaper] Improve type safety of the callback function.