Comparing variable and conditional statements