Fix a crash when promised value is null