check objects and arrays first