il senso è che

if doc è = a document.getElementById,
doc è relativamente = anche a id, che è appunto un id del documento.