Checking type of callback for backwards compatibility