Validate object constructor.

Provides support for requiring an object to be an instance of a given constructor.

Closes #408.
Typo on dose.