Added scrollCallback type checking