prototypejs returns null and not undefined

prototypejs returns null and not undefined if there is no element in the DOM with the selected id