Better to make the requirement explicit, instead of relying on the argument-parsing details of rm or some other command:
# Default message
$ rm -rf "${DIR:?}"
bash: DIR: parameter null or not set
# Custom message
$ rm -rf "${DIR:?It is not set OMG}"
bash: DIR: It is not set OMG
sweet mercy :O
Someone call the Inquisition