Crash Fix for Graph cleanup MAGN-3977

RemoveTransitiveEdges() crashes while de-activating a null edge in
certain scenarios. Put a null check to avoid the crash.

Fixes http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-3977
Merge pull request #2042 from sharadkjaiswal/MAGN-3977

Crash Fix for Graph cleanup MAGN-3977