Updated entity helper to infer content type