When calling MPI_Topo_test, explicitly deal with MPI_COMM_NULL as it is not a legal value. Although it is what is return for leftovers process when creating cartesian grid or graphs.