Added function to test variable existence