Added IsValid checks.