private static bool IsType( Type type, Type check ) { return type == check || type.IsSubclassOf( check ); }