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.
Indentation should use a tabs, not spaces