Move declaration, run check earlier