Since I would like to use these attributes values mentioned above to control some aspects of symbology (symbol size, opacity), some further research revealed that with data defined properties there is another great (and flexible) way to achieve this. A (generic) expression
if("attribute_name" is null, @default_value, "attribute_name")
where @default_value
is defined as a projects variable, returns a default that can be defined by the user when no value is set for the attribute attribute_name
and it's value else.
Define variables in project properties:
Set up an expression with data defined properties (red color with user defined opacity in this case):