update error checking in createGoal.js