Made isValid methods const