Ticket #292 - Check if callback is defined and assign to function