check if assigning subdocument to scalar value occured