Testing for an empty object is not straight forward in JavaScript. It would be easier to add a name / value pairing like this when stringified:
{ "complete": true }
So we should have complete in the RTCIceCandidateComplete dictionary which is mandatory and set to true.