Only join input if not a string.

Fixes #623.