Added a check for deletion of the user primary key and a corresponding error