Revert "Clean up code branch for --no-key vs. --key"

This reverts commit 73f6c1bf0e9a19e01afd117d62024b863e38eae6.
Use a ternary for defaultValue