Check for None

It looks like #10971 broke the test suite. This fixes it.