Fixed null descriptor check when building spec