pythonic null check update