Adding test for nil input (when you hit control-d for example)