Add context null check in oncreate clauses
Merge pull request #53 from Doplgangr/NPE