Added a check for 'null' before getting the native pointer of a wrapped object.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #109 from ddobrev/master

Added a check for 'null' before getting the native pointer of a wrapped object.