Using if instead of ifelse checking parallel availability