Distinguish between adding and updating expression