In my Typescript code, I have two objects named Employee1 and Employee2.
I am looking for a method that can return the non-null object between the two.
If Employee1 is not null, return Employee1. If it's not null, return Employee2. If both are null, return nothing.
Is there a more elegant way in Typescript to achieve this without using plain if-else statements?