Error checking for objects

Need to add error checking for if an object that is specified in the parameters does not exist in the object received from gmaps.
Global leak I think, missing a `var`.