Fix issue with null vs undefined