Fixed wrong function called.
Throw exception when an invalid value type is set in a header field.