Helper function for ifnotnull as an expression.
result of thenClause or elseClause
if all expressions are not None, returns the result of thenClause, otherwise returns the result of elseClause