does a check before inserting values