add isPrimitive method test.