Empty variables are dangerous
An unset variable expands to nothing, so a command loses an argument and does something different rather than something wrong. ${var:?message} stops the script with your message, which is the guard worth using by default.
Quoting inside the quotes
Double quotes allow expansion, single quotes do not. That difference is the whole reason both exist, and mixing them by accident is what turns a message into a command substitution.