switch to call conversion fix

Cannot run if statement on variable types that aren't compatible