Unhandled Exception in a simple IF statement

I have just discovered Error Reporting Application (ERA) and checked my apps.
The only report so far is one for the Battery Guesstimate App:

I seems to happen regularly, but its weird because the code is a simple IF statement

if (systemStats.charging == true && chargeNotification > 0 && systemStats.battery >= chargeNotification) {

systemStats are read by: `var systemStats = System.getSystemStats();`

and chargeNotification from the properties via `var chargeNotification = Properties.getValue("charge-notification") as Integer;`

What could go wrong with that?

Here the full code with context: github.com/.../BatteryGuesstimateApp.mc