Added a way to check the creds to see if it is an object or a location and handles it accordingly.