I'd say you should convert object -> string before this loop