As this is a C function you should not return Qnil here. Handle it differently (probably in `method_get_battery_charge`)