[network] check for empty value before writing config (fixes #267)