Clean up conditional function in _io/dymola.py