Fix parameter assertions to give explicit reasons (#143)