Avoid putting bad data in the db