Fixed retarded undefined null
whoops forgot to merge first
Merge pull request #13 from StommePoes/master

Fix for null/undefined retardation on my part