Invariant type wrapper and utilities