Streamline isValid check.