Add tests for invalid values and __toString().

Refs #3429
Merge pull request #3440 from markstory/issue-3429

Add tests for invalid values and __toString().