Changed variable check

Changed the check for variables in the conditional.