CheckIO: Improved handling of function return type