Param validation

fixes #4