Bug fix for mime type checking (null check)