Make code more robust to bad input (for case where DB was populated with string None)
Merge pull request #4003 from edx/pmitros/fix-sequential-none

Fix case where DB gets populated with string None