Function dedicated to checking an object has the right format