Adding a check for db record creation.