const result = something[dynamicValue]
Given the above code, I can get error of Cannot read property 'x' of null
because something is undefined, how do I fallback check to void error? should I do something like this
const result = something && something[dynamicValue]