adds serialization for option-types