Validation fails for objects without prototype === Object

https://gist.github.com/threewestwinds/9260136

Basically, validation doesn't work when using any form of inheritance.

This pull request adds the option to use a function for `type` validation, passing only for objects which use the given function as a constructor.