Check kernel object types when looking up ids

Some games misuse it, need to return an error.  Just adds a new static method.

-[Unknown]