Isn't this the same as:

```javascript
if (app && app.toLowerCase() === "safari") {
```