prevent invalid objectId exception being thrown in case an empty string is passed as key (which should not happen btw)