Extension function for Value to unwrap Value to the given type.
Throws exception if type doesn't match.
the class to unwrap to.