Better error handling in CRM_Utils_JS::decode