If I have two pointers of the same type and one is null, is there a function/obvious one-liner that can efficiently return the one that's not null? I know that I can do this with some nested if
blocks, but I'm just wondering if there's a more compact way to do it.
Edit: It would be optimal if this could also return null if both or neither are defined.