kernel/v2: check if type is set before validation