According to the same logic, I mean xor on screen and location, how about the following:
```
      if(isNaN(parseInt(app['screen'])) ^ isNaN(parseInt(app['location']))) {
        throw new Error('Invalid app missing location or screen property');
      }
```

I assume that screen and location must be number and use parseInt to check if it is undefined or null.