make sure received data is within expected limits