Convert to str if needed.

see #653