Casts expected value and hash value to int