check that we have valid data