Unify MIME type-checking methods for Solr documents and GenericFiles