RxJs return Observable if variable not undefined
<p>I would like to create a method getSelectedUser that return an Observable only if a private field is there (not undefined).</p>

<pre><code>private user : User

init() {
   // user = loadingUser...
}

getSelectedUser(): Observable&lt;User&gt; {
    // return ???
}
</code></pre>

<p>The goal is that other component can subscribe this observable and receive the user once it is loaded.</p>

<p>Does someone have an idea how I can achieve this?</p>