basic type checking fns