Oracle Solution for Error ora-13031

Solution for Oracle Error ORA-13031

ORA-13031: Invalid Gtype in the SDO_GEOMETRY object for point object

What triggered the Error:

There is an invalid SDO_GTYPE in the SDO_GEOMETRY object where the VARRAYs are NULL but the SDO_GTYPE is not of type POINT.

What should we do to fix it:

Verify that the geometries have valid gtypes.