Add safety check for link operation