Proper variable checking