Replace string parsing for if statements in attributecalculator