validate object structures and values.