Take Callbacks directly instead of using instanceof and a cast.