Move inside the if statement to avoid garbage creation.