Fix another layout regression.

Go back to the correct way of checking for nil? so that custom layout config is preserved.