refactored add_element_methods, moved check for nil to element, and spec