Certainly, as long as we handle hydrogen with care. In fact, much like we have to be careful with how we handle natural gas right now, because both substances are flammable and can explode. A significant benefit of hydrogen is that when it is burnt, it does not release carbon monoxide.
Research has shown that the natural gas pipe network can be made suitable for hydrogen with a few adjustments. That means that an entire district or even a whole village can switch from natural gas to hydrogen. Before we make the switch, the natural gas pipe network must be thoroughly checked of course. Safety first.