Combining an AND and two ORs in rules

Hi,

I would like to express this rule

rules:
- if: $CI_COMMIT_BRANCH == “master” && ($CI_COMMIT_TAG != null || $automation_env == null)

However I gather you cannot group expressions like this (using brackets) and wanted to clarify that this will have the same effect:

rules:
- if: $CI_COMMIT_BRANCH == “master” && $CI_COMMIT_TAG != null || $automation_env == null

Thanks