Checks if the 'networks' key is set, before looping through it.