s390: Move tdesc validation to separate function