Fixed crash with null with hasManyMapping

#36

Added new tests