added check to see that callback exists