(cleanup) Check before calling property of uninitialized var
Merge pull request #6 from Jygsaw/master

(cleanup) Check before calling property of uninitialized var