How come the mixture of assertions and `throw new Error`? Can assertions be used universally?