share object between components : subscribe to a Subject

i’m trying to share an object defined as:

export class Utilisateur{
    id:number;
    nom:string;
    prenom:string;
    localisation:string;
    service:string;
    structures:string[];
}

with two components. for that, i’m using this implementation :

on service CreationUtilisateurService:

userToBeUpdated = new Subject<Utilisateur>();

on component A:

i inject the service on constructor :

private creationService : CreationUtilisateurService

this.creationService.userToBeUpdated.next(event.data);

on component B:

i inject the service on constructor :

private creationService : CreationUtilisateurService

on ngOnInit i try to get the user :

    userToUpdate : Utilisateur;
    userSub : Subscription;
this.userSub= this.userCreationService.userToBeUpdated.subscribe(user=>{
                this.userToUpdate=user;
            });
            if (this.userToUpdate != null || this.userToUpdate != undefined){
                alert("modif"+ this.userToUpdate);
            }else {
                alert("create" + this.userToUpdate);
            }

normally if the event.data contains data i must to have an alert("modif"), but i’m having all the time "create". is there something wrong on my implementation ? why the user on component B is always undefined even if the logs shows that the event.data pushed on the subject contains data.

Source: New feed
Source Url share object between components : subscribe to a Subject