Avoid duplicated conditionals