See: https://riptutorial.com/lua/example/26503/emulating-ternary-operator-with--and---or--logical-operators-#undefined