convert to dict in case it is "instance"