Replaced ValidPanel with IsValid

Replaced all instances of ValidPanel with IsValid, since ValidPanel is
deprecated.