On the magnetic and valence properties of Ce-Mg-Y compounds