Make EntityEncoder.contentType return a content type.

Closes #150.