public static boolean isValidPort(final int port) {
    return port > 0 && port < 65536;
  }
Checks the port is not null and is in the valid range port (1-65536).

@param port The port to check.
@return True if the port is valid, false otherwise.
util/src/main/java/org/hyperledger/besu/util/NetworkUtility.java