Avoid calling functions on undefined data object
Merge pull request #18 from MSchmidt/patch-1

Avoid calling functions on undefined data object