Fail more clearly if given invalid input