Move if statement outside function call