Validity check.