Fix unknown mimetype condition

Return value of mimetypes.guess_type(name) is a tuple. First element may be None, not the tuple.