Fix for issue #22

#22 NSNull values cause crashes