checking if callback function is not null