Fix mug type conversion bug

Checking the exception message is not portable across different browsers (failed on Chrome, worked on Firefox).

http://manage.dimagi.com/default.asp?108638