as part of building a spreadsheet tool for my organisation, I need to baby proof as much as possible said tool, which means checking a few conditions before allowing a function to run. I have a version of the code running but I'm wondering if there's a way to optimise it. 

In the code below I'm using a for loop to check if a row in Col B has an empty value while having some value in Col C,D,E or F on the same row. 

If the condition is true at least once than then we stop the loop and alert user. If the array pass the check then we do something at the end of the loop.

Can we avoid the loop at all? How one would optimise the code? 

I did some research but .every or .some don't seems to cut it given the array structure of a range of value in Google Apps Script.

Here's a code summary on the part I'm interested in :

```js
function myFunc() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet(),
      bench = sheet.getSheets()[0].getRange('B1:F14').getValues();

  for (var c = 0; c < bench.length; c++) {

    var check = bench[c];

    if (check[0] === '' && ((check[1] || check[2] || check[3] || check[4]) != '')) { // check if a row in Col B as an empty value while having a value in Col C,D,E or F

      SpreadsheetApp.getUi().alert("line " + (c + 1) + " has no company name");
      break;

    } else { // everything pitchy

      if (c == (bench.length - 1)) {

        //Function run normaly

      }

    }

  }

}
```