Port fields are inconsistent. Some are string, some are ints. Use a general address type for these fields that includes: host, port (int or "auto").