Use a more natural guard for the callback definition