Prototype.js error on a function
<p>I am getting error on following function:</p>

<pre><code>Event.observe(window, "load", function () {    
    if ($("question") &amp;&amp; $("question").type.toLowerCase() == "textarea") {
        Event.observe("question", "keyup", function () {
            var _4 = $F("question");
            if (_4.length &gt; 255) {
                $("question").value = _4.substring(0, 255);
            }
        });
    }
});
</code></pre>

<p>type is null or not an object.</p>

<p>in prototype.js it gives error on:</p>

<pre><code>   var respondersForEvent = registry.get(eventName);
    if (Object.isUndefined(respondersForEvent)) {
      respondersForEvent = [];
      registry.set(eventName, respondersForEvent);
    }
</code></pre>
