You can use some Lua magic and rewrite Etan Reisner's comment as
local E = {}
local my_val = ((frameActions or E).action or E).c
if my_val ~= nil then
--your code here
end
This code checks if frameAction is nil aswell.
Explanation:
This is how lua will evaluate second line (consider that frameActions = {foo='bar'}
):
(frameActions or E) --> {}, because frameAction is not nil or false and then will be take as result
(frameAction.action or E) --> E, because there is no 'action' key in frameAction table, so second 'or' argument is taken
E.c --> nil, because there is no 'c' key in empty table
Those 'check chains' could be even longer. For example:
local E = {}
local my_val = ((((foo or E).bar or E).baz or E).xyz or E).abc
if my_val ~= nil then
--code if foo['bar']['baz']['xyz']['abc'] is not nil
end