networks: Fix incorrect access of DNS settings
networks: Fix incorrect access of DNS settings

Network manager's libnm throws a critical message for when accessing DNS
entries from IPv4 configuration when there are none available.  See the
number of entries available before accessing them.

freedomboxtwh/Plinth,harry-7/Plinth,freedomboxtwh/Plinth,vignanl/Plinth,harry-7/Plinth,harry-7/Plinth,vignanl/Plinth,kkampardi/Plinth,vignanl/Plinth,kkampardi/Plinth,kkampardi/Plinth,harry-7/Plinth,vignanl/Plinth,vignanl/Plinth,harry-7/Plinth,freedomboxtwh/Plinth,kkampardi/Plinth,kkampardi/Plinth,freedomboxtwh/Plinth,freedomboxtwh/Plinth