simple: split data/length validity checks into two