docs: function validateRoleIdMatches(method, matches) {
          var i, len;
          var j, lenJ;
          var k, nKeys;
          var arrayOk, elem, isArray;
  
          if (!J.isArray(matches) || !matches.length) {
              throw new Error('Roler.' + method + ': matches must be a ' +
                              'non-empty array. Found: ' + matches);
          }
          arrayOk = (method === 'setRole2IdMatches') ? true : false;
          i = -1, len = matches.length;
          for ( ; ++i < len ; ) {
              i = -1, lenJ = matches[i].length;
              if (!lenJ) {
                  throw new Error('Roler.' + method + ': matches round ' +
                                  i + 'has no elements.');
              }
              for ( ; ++i < lenJ ; ) {
                  if ('object' !== typeof matches[i][j]) {
                      throw new Error('Roler.' + method + ': matches ' +
                                      'round ' + i + ' element ' + j +
                                      ' should be object. Found: ' +
                                      matches[i][j]);
                  }
  
                  nKeys = 0;
                  isArray = false;
                  for (k in matches[i][j]) {
                      if (matches[i][j].hasOwnProperty(k)) {
                          nKeys++;
                          if (k.trim() === '') {
                              throw new Error('Roler.' + method + ': ' +
                                              'roles matches (' + i + ',' + j +
                                              ') has invalid key: ' + k);
                          }
                          elem = matches[i][j][k];
                          if (arrayOk && J.isArray(elem)) {
                              isArray = true;
                              if (elem.length !== 2) {
                                  throw new Error('Roler.' + method + ': ' +
                                                  'roles matches (' + i + ',' +
                                                  j + ', ' + k + ') has ' +
                                                  'invalid length: ' + elem);
                              }
                              validString(method, elem[0], i, j, k);
                              validString(method, elem[1], i, j, k);
                          }
                          else {
                              validString(method, elem, i, j, k);
                          }
                      }
                  }
                  // These are specific to the rolify cb.
                  if ((isArray && nKeys !== 1) || (!isArray && nKeys !== 2)) {
                      throw new Error('Roler.' + method + ': roles matches (' +
                                      i + ',' + j + ') was expected to have ' +
                                      '2 elements in total. Found: ' +
                                      matches[i][j]);
                  }
              }
          }
      }