So I want to validate something exists on a JS object:
function doSomething(config) {
// Throw if config.required is not present.
}
The most obvious way I found to do this at first was to rely on JS's "truthiness" to determine it:
function doSomething(config) {
if (!config.required) {