The consensus between professionals is that black iron is the most durable and safest form of gas piping. However, recent advancements in flexible repairs have exponentially increased the safety of this product. Tennessee Standard Plumbing uses FlashShield CSST (Corrugated Stainless-Steel Tubing) when flexible piping is necessary, because we consider it the safest flexible gas pipe on the market.
https://www.gastite.com/us/products/flashshield/flashshieldplus_csst/
Flexible piping allows plumbers to add gas lines where it may be otherwise impossible to add one after a home is already fully built and finished. As a rule of thumb, we always run black iron on the exterior of a building and then run flexible piping inside walls and crawlspaces where running rigid black pipe would not be feasible. That way, the flexible pipe is protected from physical abuse and sun damage that it could incur if it were on the exterior of a home.
Some sources say that flex piping is superior to black iron piping because if a house disaster happens (such as an earthquake), black iron pipe can actually snap and break whereas flexible pipe handle those kind of earth forces much better. These situations are extremely rare but still worth considering if you are in an earthquake-prone location.
Keep in mind that when gas piping is installed by a licensed contractor who has been trained to use commercial piping supports and to perform all the appropriate tests required to complete a system, it’s extremely safe. However, if you do smell natural gas, contact your local provider immediately.