Oracle Solution for Error ora-22951

Solution for Oracle Error ORA-22951

ORA-22951: NULL returned by ORDER method

What triggered the Error:

DER method used to compare two object values returned NULL which is not allowed.

What should we do to fix it:

define the ORDER method to not return a NULL.