It is best not to dry fire almost any handgun (I am sure there are exceptions out there).
That said, I have done it many times, I just try and not do it. You can uncock a luger by pulling the toggle back 1/2 to 3/4 of an inch and then release the trigger, it won't pop them as you release the toggle back gently. Never loaded of course....
Ed