handle `nil` strings more gracefully