Convert id to string before escaping