There isn't any safety concerns with a mass gainer shake or anything like that. It's just the fact that there are much better options available that will give you better results and are much more cost effective.
Mass gainers will help you gain weight for sure but you will probably feel really bloated and gassy while using it. Read the ingredient list. It's full of artificial colors, sweeteners, flavours and preservatives.
It's also not only going to be the weight you want to gain. I have had so many friends who get fat from mass gainer shakes. They are loaded with sugar and poor quality oils.
I personally would get a high quality protein powder and make your own lean mass gain shake. It'll be much cheaper, and provide much more nutrients then any mass gainer.
For a whey protein - you want to see nothing but that in the ingredients list. Whey protein, natural flavours, a natural calorie free sweetener like stevia and then maybe some salt, soy lechitin and cocoa powder. There are a lot of good products on the market. I personally use isolation from n2bm.com. A good whey isolate should be pretty much fat and carb free. Isolation has 26g protein, 1g carb, 0g fat per 30g scoop.
Buy a high quality blender and blend together the following:
2 scoops of a high quality whey protein isolate
oatmeal
natural almond butter or peanut butter
frozen fruit
banana
ice
chia/flax seeds
spinach/kale