qtscript: Add parameter checking for buildings that do not exist. Fix one such error in semperfi.js.