Check for empty list when printing
Check for empty list when printing

A Namelist generated from a dict may assign an empty list as a value,
which was unhandled by the _var_string() function, which converts
variables to strings, as used by print().

For example:

    nml = Namelist({'sec': {'a': []}})

should yield

    &sec
      a = ,
    /

Such a namelist would normally assign `None`, which is indistinguishable
from an empty list.

I do not think we should be converting [] to None in the
construction of the Namelist(), since Fortran does contain a notion of a
zero-length list.  Instead, we check for both None and [] when deciding
how to write the output, which (as before) has the same output.

marshallward/f90nml,marshallward/f90nml