Fix NPE when using getByKeys with noClassNameStored