CheckIO: Handling of casts (#4964)