[MNG-1697] Added a new null check and unit test to addEdgeWithParentCheck(..), just to make sure this is fixed. (I think it was already fixed, but this is just to be extra sure.)