Periksa JavaScript jika tidak berbeda

if (typeof myVariable === 'undefined'){
    //myVariable is undefined
}
Grepper