Making input validation cleaner