In the documentation for the firabase realtime database it says for the % sign:
Used to find the remainder of dividing one variable by another in a rules expression.
This write rule grants write access to users with even-numbered user IDs:"$user_id": { ".write": "$user_id % 2 === 0" }
However when i try to use it, it throws an error saying that "left operand is not number".

They touch on this briefly in the docs:
Note: PATH KEYS ARE ALWAYS STRINGS. Because keys are always strings, attempting to compare a $ variable to a number will always fail. This can be corrected by converting the number to a string using the + operator.
However I think I must have misunderstood it, because I keep getting the same error.

What am I missing?