fixed validating of UploadedFile instance

I've added a new method isAValidUploadedFileInstance which checks for instanceof in both ways: with namespaces and without'em. Now using this function everywhere within class instead if direct checking for instanceof UploadedFile.
Should be on a new line