Right. My bad. Although, I would probably have just written "name".equalsIgnoreCase(k) to avoid both the instanceof check and the cast. But we clearly have different styles. :)