type check utility