Fix unicode/str error in object validation