I am not asking if the variable is undefined or if it is null. I want to check if the variable exists or not. Is this possible?
null
When you try to access a variable which is not declared in the context, you will see that the error message says it is undefined. This is the real check you may perform to see if the variable if defined or not than null check.