Add check for the default values type

It should match the type of the option.