invalidity tests for strings