Throw error if scriptText isn't text