Fixed crashing when invalid input is entered

Previously, entering invalid input (such as “help”) would cause a
crash. This fixes the issue and instructs the user on the proper format.