Change PrimitiveType to constants