For that you can use Selection and check what's selected with TypeName.