fix crash from null json

- ruben