Issue #10. Add user input validation