keep that statement and add format check:
```
if ('language' in navigator && /^[a-z]+(-[A-Z]+)?$/.test(navigator.language)) {
  return;
}
```