Re #1335 Preventing null pointer exceptions.