Add option serialization and comparison

Huh? this is weird, why not part of the errorf?