A series of little helpers for user input validation.