fixed crash when validating non string data

fixes #3087