Santize input

If $var is empty due to user error, tested condition becomes

if [[ == y ]];

enclosing in single quotes prevents this.