Convert to string if not already

This could allow a user to use a buffer, for instance.