The solution to the problem is to display the weapon but not poiint it at the person. Why a hand gun is far better in a situation like this than a long gun.
Display is “brandishing”, depending on how it’s done.
Better is to not answer the door if you don’t expect someone.