handle null belongsTo ids