fixes #6381 - TFTP orchestration checks applicability of medium to OS late

and ideally handle the case where medium is not nil as well