Use proper syntax to detect defined/undefined variable