This is very common in Elm but it blew my mind after years of programming in Python. In Python it is very easy to raise an IndexError by getting an element from a list by index that doesn't exist. eg.
# python
names = []
names[0] # <- raises IndexError
In Elm you are forced to always consider this possibility. # Elm
names = []
case List.head names of
Just name ->
name
Nothing ->
"empty"