Fixes #339 - skips invalid properties.

* Skips processing of properties without values.
* Passing selector name to property optimiser is far from ideal but have to do for the time being.