Hmm. . . . . Not sure how I feel about this. You're going to need to check for and handle null somewhere; I think it's better to do so before you create a media type.

For example, I think this code is perfectly reasonable:

```
  String contentType = response.header("Content-Type");
  MediaType mediaType = contentType != null ? MediaType.parse(contentType) : DEFAULT_MEDIA_TYPE;
```