There are a handful of techniques that help you make the most of Elm.
Wrap Early, Unwrap Late
Model data with its ideal form. The sooner you can get it into its ideal type, the better. The later you can turn it into a non-ideal type, the better.
Make Impossible States Impossible
A data modeling philosophy. Start by identifying all the possible states your type can express, and then remove the ones that represent invalid states.
Parse, Don't Validate