Added some error checking for the validity of the selected model type.
Authored by: bugman 2008-07-09
Parent: [r6864]
Child: [r6866]