Fix sloppy use of len(None)