Fixed wrong check for uploaded file.

When trying to upload a file, you got a 500 `Object of class Symfony\Component\HttpFoundation\File\UploadedFile could not be converted to boolean`. This should fix it.