Make sure we're not merging nil in to_json

Options argument might be nil. Therefore it fails when trying to call
{}.merge(options) (for example when recording examples with apipie).