MIFOSX-945 - added null check for id while sorting the transactions