Within the definition, we commonly see the pattern key: type | null. However, this seems to mean two things, both of which are used when requesting WCIFs from the site. We can either have: key: null, such as in the case for a person with no avatar, or no key present at all, such as in the case of Competition/Event/competitorLimit.
I have not looked through the worldcubeassociation.org code to see how this is enforced yet; however, undefined should probably be used in place of null to mean the key is optional.