Validate datastore option "YEAR"

The YEAR option is a numeric value, so should be OptInt in order to
go through validation.

[FixRM #8345]
[FixRM #8344]
Type conversion
Land #2266, @wchen-r7's patch forn [SeeRM #8345] and [SeeRM #8344]