prevent quoted null when to_json is called on nil relationship