Fix NPE when converting null values (#11895)

Change-Id: Ia2f7f3b0063f3966a816f8afbed11df22d595fc8