Check if property is set

```getValue``` didn't check if the property on an object exists so wouldn't return the default value.
Merge pull request #3445 from Alex-Code/getValue

Check if property is set