Here's an example of using client data when it is not reliable and can be manipulated. The basic rule of thumb I use when making scripts is this: if this variable can be manipulated by the client, don't trust it. Either validate it or use a different method. For example, here's a quote from the manual in regards to the ['type'] index:
This mime type is however not checked on the PHP side and therefore don't take its value for granted.
The first question I'd like to ask is this: why are you concerned with the file type at all?
If it is absolutely necessary, and I would love to know why it is, then you may be able to more accurately find the file type by using a function like [man]mime_content_type/man.
EDIT: Apparently the [man]Mimetype[/man] extension is deprecated in favor of the [man]Fileinfo[/man] extension. Either way, you'd need to do a phpinfo() to check what modules your webhost has installed.