Bug fix in "isSameResonator"

It was throwing error when only one of the resonator is null.