Fix case where DB gets populated with string None

There's a funny code path where there is a string 'None' here sometimes. This unbreaks it. I don't know the code around this very well, so a sanity check would be nice. @dianakhuang @flowerhack 
need to enclose this in parens: `except (ValueError, TypeError)`, otherwise it'll only catch `ValueError`s.