correctly check for nil value (bnc#803787)

- 2.23.4