Handled Null pointer exception.
Merge remote-tracking branch 'upstream/dev-branch' into dev-branch

* upstream/dev-branch:
  Added code in methods.
Merge pull request #275 from anilgooru/dev-branch

Handled Null pointer exception.