I somehow scrapped Nick Valentine, is my game broken?
Although normally this isn't possible, Fallout 4 is not without its bugs.
There is a way to force mods onto things they are not intended for.
You most likely was scrapping so fast that you somehow was able to target Nick with the scrap dialog, and end up actually scrapping him.