Then shouldn't the compiler just skip over that line ? It's an if statement. I'm iterating through all the tags until one of them meets my conditions. I don't understand how this is bad code practice. I'm not able to know if a condition is met other wise. Why have if available to use in the first place right ?