Prevents repl panic

Fixes https://github.com/google/cayley/issues/191

I have agreed to the CLA