refactor(payload): clean up payload type-detection