{} is truthy, we must check for nonempty state explicitly

The previous version of this code could never exercise the false
branch of the if statement here, because the `network` variable is
initialized to `{}` which is a truthy value.