Fix some type comparison warnings.