Nope, I'm wrong. Should be:

if (null === $grantedRight->id)

ref: https://www.qubit-toolkit.org/wiki/Coding_standard#is_null.28.29