Added InMemoryUploadedFile handling to PreviewImageWidget 

Previously, the PreviewImageWidget used a try-except block on a ValueError to prevent thumbnail generation on a InMemoryUploadedFile value.  I switched this to a explicit check on the value because this no longer throws a ValueError on a InMemoryUploadedFile value.