Conditional based on variable type?

I've only found information regarding declarations and casts. Do you have an example of using this in an if statement?