[javascript] JavaScript isset() equivalent