Yes, its in pynvl-lib.
from pynvl import nvl, coalesce
print(nvl(None, 5)) # 5
print(nvl("hello", 99)) # 'hello'
#Coalesce is there too:
port_address = None
ip_address = None
mac_address = "A1:B2:C3:D4:E5:F6"
print(coalesce(port_address, ip_address, mac_address)) # "A1:B2:C3:D4:E5:F6"