One thing I've learnt the hard way is being consistent
Watch out for mixing:
import { BehaviorSubject } from "rxjs";
with
import { BehaviorSubject } from "rxjs/BehaviorSubject";
This will probably work just fine UNTIL you try to pass the object to another class (where you did it the other way) and then this can fail
(myBehaviorSubject instanceof Observable)
It fails because the prototype chain will be different and it will be false.
I can't pretend to understand exactly what is happening but sometimes I run into this and need to change to the longer format.