Divide objects dependig on subtypes

Hello everybody, 
I have an algorithm that gives back some objects with different subtypes.
Is there a way to put an if statemant that gives me the possibility to separate the results dependig on the subtype?? 
Something like: if (object subtype == blog) { print something} else ......

Thank you so much.