Check if elements exist