Reverted changes to getObject and added them to new tryToGetObject methods