Primitive type checking implementation