A bit nicer way of checking valid params.
Merge pull request #2 from wbyoung/better-property-check

A bit nicer way of checking valid params.