Test that we do no store data or add period keys if errors

Also fix the tests - without the is_ they behave VERY STRANGELY and
don't all fail when they should (and don't complain about it).
Improve the clarity of the logic to return early if errors