I think you don't need `isText` here, instead you can just check `!credit.hasImage()`.