Conditionally added insert checks to prevent invalid length strings from being entered into the database.