Prevent from passing non-string values to specialchars() in text widgets

When there are already values in the database and you change the inputType to text or textarea there might be a possible type issue:
```
htmlspecialchars() expects parameter 1 to be string
```

I don't know if this might happen in the core but for all the extensions that offer to dynamically generate a widget (like Isotope, MetaModels, dma_elementgenerator etc.) this causes potential trouble.