assert this at the start of the function with goog.asserts.assert