kbGraph: add exist_edge function