Use the optString pattern

Instead of checking for the presence of a field and using defaults if
it doesn’t exist, use the optString method.