Yes, you can always revert to original firmware, assuming there is an official firmware published by the reseller. Even if there isn't an original firmware published by the manufacturer you can often make your own backup. How you do so can be more or less difficult and involves researching the router in question.
1) (Very easy) In many cases, you can just flash back the original firmware using the flash firmware page in DD-WRT.
2) (Easy) In some cases you'll need to use a firmware recovery page. Most routers have one, often accessed by pressing the reset button
3) (Intermediate) In older routers that have no recovery page(s) there is also an option of TFTP flashing. This is more complex and too specific to discuss here, but put simply involves pressing the reset button at the right time and then uploading a file via TFTP from your computer
4) (Difficult) When all the above are unavailable, you may have to physically disassemble your router to issue commands to it via a serial interface. If there is no original firmware published, then this also allows you to backup the original firmware.
5) (Very difficult) And when even that fails, you can directly access the flash chip via a JTAG interface
As for if it is safe that entirely depends on your competency. As long as you use the correct file for your router and an image specifically designed for your make, model, and revision, it is very safe. Routers have dedicated bootloader and recovery flasher partitions that are separate from the main OS and should never be overwritten by DD-WRT.
They also provide special revert images for some routers: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=85237&postdays=0&postorder=asc&start=0
– icl7126 – 2017-03-02T11:28:41.657