Add isCasting() function for UI