Minor code changes in objectmgr
* Fixed some possible crashes
* Added some more error messages about incorrect values
* Fixed false messages about pet trainers