We are frequently using the following code pattern in our JavaScript code
if (typeof(some_variable) != \'undefined\' && some_variable != null) {
With Ramda, you can simply do R.isNil(yourValue) Lodash and other helper libraries have the same function.
R.isNil(yourValue)