Use a helper to get type indices