Adding mime_type method

Adds a simple way to get the mime type of an object.