Keep in mind that you may want to check both: mandatory and optional names. That's why mkOption would be a bad option here. Except that types.attrsOf sounds like a good idea - if its documented properly :)