In the build task, check to ensure the theme is valid before building