This is duplicated in several places, we should think about normalizing this. Also, a check that callback is actually a function would probably be appropriate here if we're validating anyway.