fix trying to access property on a null object.
Merge pull request #31 from petitphp/patch-3

fix trying to access property on a null object.