[Resolver] Extract edge_is_valid_for_target? method