I tried
participant = conferences[0].participants('participant')
but this always return a participant even though the participant is not in the conference.
participant = conferences[0].participants('participant').fetch()
returns an error if the participant is not in the conference
Try something like the below: