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.
but that's the fix itself. read please the related issue.