make sure preview prop is instanceof OC_Image before using it in showPreview

fixes https://github.com/owncloud/core/issues/10012

wasn't able to reproduce it, but this patch makes sure the error doesn't occur

please review @icewind1991 @MorrisJobke @oparoz