This is a silly question, but you can use this code to check if something is a particular type...
if (child is IContainer) { //....
Is ther
Why not just use the else ?
if (child is IContainer) { // } else { // Do what you want here }
Its neat it familiar and simple ?