It depends on what you mean by "empty". The most common pattern is to check to see if the variable is undefined. Many people also do a null check, for example: if (myVariable === undefined || myVariable === null)...
or, in a shorter form: if (myVariable || myVariable === null)...