return null when the element is undefined