Check for string types in cmd_send.

This makes the API behave more like most would expect, and fixes rejoins.