Each of these will throw a NPE:
OGCGeometry.fromText("LINESTRING EMPTY").estimateMemorySize();
OGCGeometry.fromText("MULTILINESTRING EMPTY").estimateMemorySize();
OGCGeometry.fromText("GEOMETRY EMPTY").estimateMemorySize();
OGCGeometry.fromText("MULTIGEOMETRY EMPTY").estimateMemorySize();
Expected: it should not matter if it's empty, it should return the estimated memory size without error.