Raise a useful error message on str. Fixes #23