testing whether resolve returns undefined before creating a composite object