Merge "Add missing type casts before comparison."