Type-safe config:get and :set methods

BugzID: 25731