Allow callback to be a string for backwards compatibility & added test cases.