`assert` doesn't really work on Android. We need a normal `if` + `throw` (or helper method).