You could just do:

```javascript
if(!isValid) { ... }
```