Samsung only recommends charging with the official charger. But if the wattage and voltage is LOWER than the official charger I would personally consider it as save. (If the cables are not damaged of course).
If its higher things are likely to get slightly smokey