Fix compiler warning about type comparison