use a better assert

at least the default error message will be meaningful