Handle some data validations more elegantly.