Added function to get MIME type