We should check that the identity is valid (i.e. not null) before sending it to the platform.