Extension checking is one way to go about checking if a file is of a particular format, but if that's all you've got, there's nothing preventing someone renaming a JPG to a DOCX and uploading it.
The mime checker (I assume) actually looks at the contents of the file and says 'that's a image/jpg', completely ignoring the filename and extension.
I don't know of any way in PHP to fingerprint if a file is a DOCX or PDF or not. Anyone?