Added quotes around all empty variable checks