Quantized Born Effective charges as probes for the topological phase transition in the Haldane and Kane-Mele models