VID-2143 Make sure we have a ThumbnailImage object with a File when crea...

...ting gallery image

There have been instances of the following fatal being thrown: PHP Fatal error:  Call to a member function getTitle() on a non-object in /usr/wikia/slot1/2618/src/extensions/wikia/Thumbnails/ThumbnailController.class.php on line 99

Make sure the $thumb object being passed to this controller is a ThumbnailImage and that it has a corresponding $File object. If not, log the error so we can investigate down the line.

Ticket: https://wikia-inc.atlassian.net/browse/VID-2143
I think this should only check `!$thumb instanceof MediaTransformOutput`