Parsing error with if-else statement in Data Function