use type() to match our other apis.