Please check that your key exists in the array or not, instead of simply trying to access it.
Replace:
$myVar = $someArray['someKey']
With something like:
if (isset($someArray['someKey'])) {
$myVar = $someArray['someKey']
}
or something like:
if(is_array($someArray['someKey'])) {
$theme_img = 'recent_works_iso_thumbnail';
}else {
$theme_img = 'recent_works_iso_thumbnail';
}