code: private boolean validPosition(String pval) {
          if (pval == null) {
              return false;
          }
          try {
              int ival = parseInt(pval);
              if (ival < 1) {
                  return false;
              }
          } catch (NumberFormatException nfe) {
              return false;
          }
          return true;
      }
docs: /*
  Check position is valid.