The value of X is determined when Essence Harvest resolves. If you control no creatures that time, no life will be lost or gained.

5/1/2012

Essence Harvest targets only the player. It doesn’t target any creatures. If that player is an illegal target when Essence Harvest tries to resolve, it won’t resolve and none of its effects will happen. No life will be lost or gained.