Yes.
Actually mother nature attacks us with EMP all the time, it's called lightning. We also get blasted by solar winds at the poles (northern/southern lights) which also cause EMP. Sandia Labs in Albuquerque was/is a major player in developing EMP shielding.
Shielding only works to a certain degree. Aircraft are particularly vulnerable as there is no discharge path. Ground facilities can atleast shunt the extra energy to ground. Backup control systems, not connected to the grid would be safer, and no doubt are in use.
Oddly a nuclear war is only a theoretical possibility. If nukes started flying, the ICBMs coming in behind the first wave may be duds because of the EMP from the first wave.
At one time there was discussion of detonating nukes in space over the north pole to disable the electronics of incoming soviet missiles.