[PLAT-5028] Add some checks before creating a swap leg