Added a test for a non-nil object id before trying to fetch the object. Generally never nil, but could be triggered if the DB is removed.