I'd prefer something a little more polymorphic and less "instanceof", but I'm also not sure how to make that happen...  This is probably fine as is, but going forward we should keep an eye on how to make this a polymorphic switch instead of with the instanceof check.