Better error messages for some invalid parameters

Closes gh-19