fix validation bug with non-strings