Replace the if-statement input checks with a validation library
Replace the if-statement input checks with a validation library