Added optional validation.

Fixes #11
Merge pull request #14 from firstandthird/feature/11-validation

Added optional validation.