Bug 845055 - Check the mime type is not null before testing the mime type itself. r=dao