Double check if an object is one of provided types - C#