fix for Cannot call method 'getTime' of null
Merge pull request #289 from zygis/master

fix for Cannot call method 'getTime' of null