Rework ?: to check if a variable exists, ?? only checks if the variable exists. Also, fix checking existence of nested properties and array elements.