hummm not I understand : 
```
if (PropertyTypes::CHOICE == $productProperty->getType() &&
    is_array($productProperty->getConfiguration())) {
```

or I put it before the previous if condition ?