Make code more robust to bad input (for case where DB was populated with string None)