Update main.py

Proposed update to catch non-standard input.