Fix mug type conversion bug

Checking the exception message is not portable across different browsers (failed on Chrome, worked on Firefox).
Merge branch '108638-type-change-fix' into autostaging