Avoid breaking the "OpenLayers.String.format" execution

Avoid breaking the "OpenLayers.String.format" execution when searching for an attribute in an undefined object.

Try changes in the tests, without the patch execution fails.

Please review, thanks.