fixed applyDetailDefaults null TypeError