check if variable is undefined or null jquery

JavaScript
if (variable == null) {
    // variable is either null or undefined
}
Source

Also in JavaScript: