Checking for nil case
Merge pull request #1 from leighhalliday/master

Checking for nil case