gracefully handle invalid repl input