title: Django Rest Framework 3.7.7 does not handle Null/None ForeignKey values
body: <p>I am getting an error with Django Rest Framework when my ForeignKey contains a null value.</p>
  
  <pre><code>unit = models.ForeignKey(
          SubLocation,
          on_delete=models.CASCADE,
          related_name='unit',
          blank=True,
          null=True,
  )
  
  class AssetSerializer(serializers.ModelSerializer):
  
      unit = serializers.PrimaryKeyRelatedField(
          source='unit.name',
          allow_null=True,
          default=None,
          queryset=SubLocation.objects.all(),
      )
  
      class Meta:
          model = Asset
          fields = ('pk', 'unit',
          )
  </code></pre>
  
  <p>Accessing the data attribute of this serializer, when the <code>unit</code> foreign key field is None</p>
  
  <pre><code>&gt;&gt; ass = Asset.objects.first()
  &gt;&gt; AssetSerializer(ass).data
  
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "C:\Python36\lib\site-packages\rest_framework\serializers.py", line 537, in data
      ret = super(Serializer, self).data
    File "C:\Python36\lib\site-packages\rest_framework\serializers.py", line 262, in data
      self._data = self.to_representation(self.instance)
    File "C:\Python36\lib\site-packages\rest_framework\serializers.py", line 491, in to_representation
      attribute = field.get_attribute(instance)
    File "C:\Python36\lib\site-packages\rest_framework\relations.py", line 177, in get_attribute
      return get_attribute(instance, self.source_attrs)
    File "C:\Python36\lib\site-packages\rest_framework\fields.py", line 100, in get_attribute
      instance = getattr(instance, attr)
  AttributeError: 'NoneType' object has no attribute 'unit'
  </code></pre>
  
  <p>As you can see, setting <code>allow_null</code> still does not work, and drf seems to be complaining about the <code>NoneType</code> object.</p>
  
  <p>How am I able to fix this error so that I can use null values with drf?</p>