You'll want to use the is expression for this http://dlang.org/expression.html#IsExpression (form #7 in the docs):
static if(is(BaseClassesTuple!UsersCollection[0] == Collection!Type, Type)) {
// this is an instance of Collection
// with the argument passed as Type
pragma(msg, "MATCH!");
pragma(msg, Type);
}
We check the base class and see if its type equal to a particular declaration. The way that works is you basically write out the type declaration with placeholders, then do a comma separated list of the placeholders you used.
So "Collection!Type, Type" matches anything that would have been instantiated as Collection, with Type being the argument.
Then, inside the static if, those placeholders are available as aliases to the arguments. So when we use Type
inside that static if, it tells you what the arg is. Here, we got out Type.