Check the lengths and each element