Remove declaration of ifPrototypeGetId which is already defined in utility.js

Also, caught a place where we weren't guarding to make sure an object existed before referencing it.