public static void checkPort(final int port, final String portTypeName) {
    if (!isValidPort(port)) {
      throw new IllegalPortException(
          String.format(
              "%s port requires a value between 1 and 65535. Got %d.", portTypeName, port));
    }
  }
Check port.

@param port the port
@param portTypeName the port type name
util/src/main/java/org/hyperledger/besu/util/NetworkUtility.java