"undefined" variable problem

I have changed `somevar === undefined` to `'undefined' === typeof somevar`.

In older browsers `undefined` is not a reserved keyword and could be changed by some badly written code.

Example:

    // somewhere in the user's js…
    undefined = "trolololo";
    
    // your library
    function test(value) {
        if (undefined !== value) {
            console.log(value); // this will log "trolololo"
        }

        if ('undefined' === typeof value) {
            console.log(value); // this won't log "trolololo"
        }
    }

    test();