Actaully I don't think that the try-catch block would do you any good. @jmarshallnz is right. The cleanest approach would be to use CVariant::isMember() to check if the "player" and the "playerid" members exist in the CVariant objects.