Added more checks to get_input_from_console() method.