A test of fit for lattice distributions