fix null pointer error in hypermerchanttrait