Fixed passing a null value to a belongsToReference.