cleaned exceptions design
unified array validation for object and non-object types