Currently we have some code that is littered with statements like
if typeof myVar != 'undefined' && myVar === 'somevalue'
I'd like to consolidate that into a single expression that checks for a value in a way that is safe against undefined variables. I realize I could write my own, but is it not part of any commonly used JS library? It seems everyone else is satisfied with the code above, but I am not!