Test whether page variable in [extra] not found

i use a control variable to determine the layout in a page.
similar to the following

{%if page.extra.layout == “top” %}

i test whether the variable exists using the following

{%if page.extra.layout and page.extra.layout == “top” %}

how to test whether a variable is not found.

along the lines of

{%if page.extra.layout == null %}

which fails.

You can try {%if page.extra.layout is defined %} if it’s not set at all in the extra

or …

{%if page.extra.layout is not defined %}

thanks appreciate it