standardize type checking