added isPrimitive