Database dupliction error check