EXPORT_PROPERTIES: Prevent null dereference for undefined property

Fixes: #18260
26 jobs for export-properties-undefined
Status Job ID Name Coverage
  External
passed cdash

passed cmake-dash3win7-windows-release-ninja

failed cmake-hythloth-linux-debug-makefiles+sphinx

passed cmake-hythloth-linux-release-lint-iwyu-tidy

passed cmake-moonshade-osx-debug-ninja

passed cmake-moonshade-osx-release-makefiles

passed cmake-terfin-windows-release-vs2017

passed ghostflow-branch-check-master

passed ghostflow-commit-check

passed ghostflow-stager

passed cmake-dash3win7-windows-release-ninja

00:26:48

failed cmake-hythloth-linux-debug-makefiles+sphinx

failed cmake-hythloth-linux-debug-makefiles+sphinx

01:20:16

passed cmake-hythloth-linux-release-lint-iwyu-tidy

passed cmake-hythloth-linux-release-lint-iwyu-tidy

00:23:09

passed cmake-moonshade-osx-debug-ninja

00:10:38

passed cmake-moonshade-osx-release-makefiles

00:12:29

passed cmake-terfin-windows-release-vs2017

00:37:49

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager