I don't think you should pass in a string like this.  You want to pass Sync.WHATEVER to this function, which will mean a number gets passed.  Then you can compare:

```javascript
validateSync: function( expectedState ) {
...
if(expectedState && sync.state !== expectedState) {...}
```