Won't this convert accelerations that are `0` to `undefined`?

I think you need to use an explicit `goog.isDef(event.acceleration)` test here.

The same applies to the other two properties.