Code fix: the validation before inserting a new database entry has been fixed