Added checks for parameter values. Closes #66.