Only use .nil? if logic requires it (e.g. comparing nil with empty string).

```ruby
unless types[default_media_type]
  #...
end
```