add instance validator
Merge pull request #5 from lvivier/types

Use a constructor as a value for type