not-having-set-to-a-value-yet can be tested as follows:

    var a;
    if (a === undefined) { //... -> true
    if (a === null) { //... -> false
    if (a === false) { //... -> false
    if (typeof(a) === 'undefined') { //... -> true
    if (typeof(a) === 'boolean') { //... -> true
    if (typeof(a) === 'string') { //... -> false