Fallback Variable Syntax

Question on how do variable fallbacks work.

I have the following line:
usefulVariable: ${self:custom.envs.${self:custom.environment}.nestedProperty, self:custom.envs.dev.nestedProperty}

is there a way to refactor and define something like the following:
envData: ${self:custom.envs.${self:custom.environment, 'dev'}}

whilst maintaining the above fallback value?

i.e. if custom.environment: 'production' but production.nestedProperty is not defined, we can still get development.nestedProperty

(obviously I can write something like:
usefulVariable: ${self:custom.envData,nestedProperty, self:custom.envs.dev.nestedProperty}, but this is too similar to the original example and we repeat this pattern many times)