Better error messages for runtime errors in cases and ifs