Fix for when .text() is called on an undefined object.

Issue #25
Issue #28