Yoda-style, we like, mm! :)

`if (TRUE === isset($pid) && FALSE === isset($relativeRecord['pid'])) {`

At first, strange it looks. But sense it will make :)