If statement in job says invalid syntax

I don’t understand why in some of my yaml workflow builds this is fine but in some it complains saying this if statement is invalid syntax

name: build-client
on:
  pull_request:
    types: [closed]
    branches:
      - master

jobs:
  if: "!contains(github.event.commits[0].message, '[skip client ci]')"
  build:
    name: Build Server & Client

Is it quoted in some and not in others?

no I’ve used the same format. It’s gotta be double quoted because I am single quoting the skip client ci text