AMEC-1862: check for undefined
Merge branch 'dev-AMEC-1862' into release/2.8.6rc