code: public static Double getMinZ(Geometry geom) {
          if (geom != null) {
              return CoordinateUtils.zMinMax(geom.getCoordinates())[0];
          } else {
              return null;
          }
      }
docs: Returns the minimal z-value of the given geometry.
  
  @param geom Geometry
  @return The minimal z-value of the given geometry, or null if the geometry is null.